package concurrent;

import java.util.concurrent.locks.LockSupport;

public class ParkTest1 {
    public static void main(String[] args) throws InterruptedException {
        Thread t = new Thread(() -> {
            System.out.println("park!");
            LockSupport.park();
            System.out.println("unpark!");
        });
        t.start();
        Thread.sleep(3000);
        t.interrupt();
        Thread.sleep(3000);
        System.out.println("end main");
    }
}
